// 点击刷新验证码
$("#code").click(function (e) {
    loadVerifyCode();
})

function loadVerifyCode() {
    $.ajax({
        type: "POST", url: '/getVerifyCode', dataType: "json", success: function (result) {
            $('#code').prop('src', 'data:image/png;base64,' + result.content);
        }
    });
}

function checkForm() {
    let verifyCode = $('#verifyCode').val();

    let flag = verifyCode.trim().length > 0;

    if (!flag) info('验证码不能为空', 'error');

    return flag;
}

$(function () {
    loadVerifyCode();
});